package org.ucas.kgraph.dao;

import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;
import org.springframework.stereotype.Repository;
import org.ucas.kgraph.entity.Company;

@Repository
public interface CompanyDao extends JpaRepository<Company,Long>{
	
	@Query("SELECT a FROM Company a WHERE a.com_id = ?1 AND a.type=?2")
	Company findByCom_id(String com_id,String type);

	@Query("SELECT a FROM Company a WHERE a.com_name = ?1")
	Object findByName(String comname);

	@Query("SELECT a FROM Company a WHERE a.com_id = ?1")
	Company findByCom_id(String comid);

}
